package com.jjh.pojo;

import java.time.LocalDateTime;

/**
 * 订单实体类
 * @author JJH
 */
public class Order {
    /**
     * 订单id
     */
    private int oId;
    /**
     * 商家id
     */
    private int shopId;
    /**
     * 菜品id
     */
    private int dishId;
    /**
     * 用户id
     */
    private int userId;

    /**
     * 菜品名称
     */
    private String dName;
    /**
     * 数量
     */
    private int count;
    /**
     * 单价
     */
    private double singlePrice;
    /**
     * 总价
     */
    private double allPrice;
    /**
     * 收货地址
     */
    private String address;
    /**
     * 备注
     */
    private String desc;
    /**
     * 下单时间
     */
    private LocalDateTime time;

    public Order() {
    }

    public int getOId() {
        return oId;
    }

    public void setOId(int oId) {
        this.oId = oId;
    }

    public int getShopId() {
        return shopId;
    }

    public void setShopId(int shopId) {
        this.shopId = shopId;
    }

    public int getDishId() {
        return dishId;
    }

    public void setDishId(int dishId) {
        this.dishId = dishId;
    }

    public String getDName() {
        return dName;
    }

    public void setDName(String dName) {
        this.dName = dName;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public double getSinglePrice() {
        return singlePrice;
    }

    public void setSinglePrice(double singlePrice) {
        this.singlePrice = singlePrice;
    }

    public double getAllPrice() {
        return allPrice;
    }

    public void setAllPrice(double allPrice) {
        this.allPrice = allPrice;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public LocalDateTime getTime() {
        return time;
    }

    public void setTime(LocalDateTime time) {
        this.time = time;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    @Override
    public String toString() {
        return "Order{" +
                "oId=" + oId +
                ", shopId=" + shopId +
                ", dishId=" + dishId +
                ", userId=" + userId +
                ", dName='" + dName + '\'' +
                ", count=" + count +
                ", singlePrice=" + singlePrice +
                ", allPrice=" + allPrice +
                ", address='" + address + '\'' +
                ", desc='" + desc + '\'' +
                ", time=" + time +
                '}';
    }
}
